import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

export const routes = [
  {
    path: '/',
    name: 'Layout',
    redirect: '/flow-magnet',
    component: () => import('../layouts/BasicLayout.vue'),
    mate: { title: '首页' },
    children: [
      {
        path: '/flow-magnet',
        name: 'flowMagnet',
        component: () => import(/* webpackChunkName: "flow-magnet" */ '../views/flow-magnet/index.vue'),
        mate: { title: 'antd/x6流程图(magnet)' },
      },
      {
        path: '/flow',
        name: 'flow',
        component: () => import(/* webpackChunkName: "flow" */ '../views/flow/index.vue'),
        mate: { title: 'antd/x6流程图' },
      },
      {
        path: '/electric',
        name: 'electric',
        component: () => import(/* webpackChunkName: "electric" */ '../views/electric/index.vue'),
        mate: { title: 'antd/x6电力接线图' },
      },
      {
        path: '/bpmn',
        name: 'bpmn',
        component: () => import(/* webpackChunkName: "bpmn" */ '../views/bpmn/index.vue'),
        mate: { title: 'vue-bpmn编辑器' },
      },
      {
        path: '/el-table2',
        name: 'el-table2',
        component: () => import(/* webpackChunkName: "el-table2" */ '../views/el-table2/index.vue'),
        mate: { title: 'eltable2' },
      },
      {
        path: '/virtual-list',
        name: 'virtual-list',
        component: () => import(/* webpackChunkName: "virtual-list" */ '../views/virtual-list/index.vue'),
        mate: { title: '虚拟列表' },
      },
      // {
      //   path: '/er',
      //   name: 'er',
      //   component: () => import(/* webpackChunkName: "er" */ '../views/er/index.vue'),
      //   mate: { title: 'er编辑器' }
      // },
      // {
      //   path: '/dag',
      //   name: 'dag',
      //   component: () => import(/* webpackChunkName: "dag" */ '../views/dag/index.vue'),
      //   mate: { title: 'dag' }
      // },
      // {
      //   path: '/orgal',
      //   name: 'orgal',
      //   component: () => import(/* webpackChunkName: "orgal" */ '../views/orgal/index.vue'),
      //   mate: { title: 'orgal' }
      // },
      // {
      //   path: '/vso',
      //   name: 'vso',
      //   component: () => import(/* webpackChunkName: "vso" */ '../views/vso/index.vue'),
      //   mate: { title: 'vso' }
      // }
    ],
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes,
})

export default router
